|
hallcurrent25 2.2.0
|
API for configuring and manipulating Hall Current 25 Click driver. More...
Topics | |
| Hall Current 25 Settings | |
| Settings of Hall Current 25 Click driver. | |
| Hall Current 25 MikroBUS Map | |
| MikroBUS pin mapping of Hall Current 25 Click driver. | |
Functions | |
| void | hallcurrent25_cfg_setup (hallcurrent25_cfg_t *cfg) |
| Hall Current 25 configuration object setup function. | |
| err_t | hallcurrent25_init (hallcurrent25_t *ctx, hallcurrent25_cfg_t *cfg) |
| Hall Current 25 initialization function. | |
| err_t | hallcurrent25_read_raw_adc (hallcurrent25_t *ctx, uint8_t channel, uint16_t *raw_adc) |
| Hall Current 25 read raw ADC value function. | |
| err_t | hallcurrent25_read_voltage (hallcurrent25_t *ctx, uint8_t channel, float *voltage) |
| Hall Current 25 read voltage level function. | |
| err_t | hallcurrent25_read_voltage_avg (hallcurrent25_t *ctx, uint8_t channel, uint16_t num_conv, float *voltage_avg) |
| Hall Current 25 read average voltage level function. | |
| uint8_t | hallcurrent25_get_fault_pin (hallcurrent25_t *ctx) |
| Hall Current 25 get FAULT pin function. | |
| err_t | hallcurrent25_calib_offset (hallcurrent25_t *ctx) |
| Hall Current 25 calib offset function. | |
| err_t | hallcurrent25_calib_resolution (hallcurrent25_t *ctx, float calib_current) |
| Hall Current 25 calib resolution function. | |
| err_t | hallcurrent25_read_current (hallcurrent25_t *ctx, float *current) |
| Hall Current 25 read current function. | |
API for configuring and manipulating Hall Current 25 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| err_t hallcurrent25_calib_offset | ( | hallcurrent25_t * | ctx | ) |
Hall Current 25 calib offset function.
This function calibrates the zero current offset value.
| [in] | ctx | : Click context object. See hallcurrent25_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t hallcurrent25_calib_resolution | ( | hallcurrent25_t * | ctx, |
| float | calib_current ) |
Hall Current 25 calib resolution function.
This function calibrates the data resolution at a known load current.
| [in] | ctx | : Click context object. See hallcurrent25_t object definition for detailed explanation. |
| [in] | calib_current | : The known load current used for calibrating data resolution. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void hallcurrent25_cfg_setup | ( | hallcurrent25_cfg_t * | cfg | ) |
Hall Current 25 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See hallcurrent25_cfg_t object definition for detailed explanation. |
| uint8_t hallcurrent25_get_fault_pin | ( | hallcurrent25_t * | ctx | ) |
Hall Current 25 get FAULT pin function.
This function returns the overcurrent fault (FAULT) pin logic state.
| [in] | ctx | : Click context object. See hallcurrent25_t object definition for detailed explanation. |
| err_t hallcurrent25_init | ( | hallcurrent25_t * | ctx, |
| hallcurrent25_cfg_t * | cfg ) |
Hall Current 25 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See hallcurrent25_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See hallcurrent25_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t hallcurrent25_read_current | ( | hallcurrent25_t * | ctx, |
| float * | current ) |
Hall Current 25 read current function.
This function reads the input current level [A].
| [in] | ctx | : Click context object. See hallcurrent25_t object definition for detailed explanation. |
| [out] | current | : Input current level [A]. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t hallcurrent25_read_raw_adc | ( | hallcurrent25_t * | ctx, |
| uint8_t | channel, | ||
| uint16_t * | raw_adc ) |
Hall Current 25 read raw ADC value function.
This function reads raw ADC value of the selected input channel.
| [in] | ctx | : Click context object. See hallcurrent25_t object definition for detailed explanation. |
| [in] | channel | : Input channel selection (0-VOUT, 1-VOC). |
| [out] | raw_adc | : Output ADC result. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t hallcurrent25_read_voltage | ( | hallcurrent25_t * | ctx, |
| uint8_t | channel, | ||
| float * | voltage ) |
Hall Current 25 read voltage level function.
This function reads raw ADC value and converts it to proportional voltage level of the selected input channel.
| [in] | ctx | : Click context object. See hallcurrent25_t object definition for detailed explanation. |
| [in] | channel | : Input channel selection (0-VOUT, 1-VOC). |
| [out] | voltage | : Output voltage level [V]. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t hallcurrent25_read_voltage_avg | ( | hallcurrent25_t * | ctx, |
| uint8_t | channel, | ||
| uint16_t | num_conv, | ||
| float * | voltage_avg ) |
Hall Current 25 read average voltage level function.
This function reads a desired number of ADC samples and calculates the average voltage level of the selected input channel.
| [in] | ctx | : Click context object. See hallcurrent25_t object definition for detailed explanation. |
| [in] | channel | : Input channel selection (0-VOUT, 1-VOC). |
| [in] | num_conv | : Number of ADC samples. |
| [out] | voltage_avg | : Average output voltage level [V]. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation.